<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <ui:page binding="#{crearVariablesBalanceCalcular.page1}" id="page1">
            <ui:html binding="#{crearVariablesBalanceCalcular.html1}" id="html1">
                <ui:head binding="#{crearVariablesBalanceCalcular.head1}" id="head1">
                    <ui:link binding="#{crearVariablesBalanceCalcular.link1}" id="link1" url="/resources/stylesheet.css"/>
                </ui:head>
                <ui:body binding="#{crearVariablesBalanceCalcular.body1}" id="body1" style="-rave-layout: grid">
                    <ui:form binding="#{crearVariablesBalanceCalcular.form1}" id="form1">
                        <ui:staticText binding="#{crearVariablesBalanceCalcular.staticText1}" id="staticText1"
                            style="color: rgb(108, 154, 154); font-family: 'Times New Roman','Times',serif; font-size: 18px; left: 253px; top: 98px; position: absolute" text="Crear operacion de  variable calculada en Balance"/>
                        <h:panelGrid binding="#{crearVariablesBalanceCalcular.gridPanel1}" id="gridPanel1" style="left: 45px; top: 119px; position: absolute">
                            <h:panelGrid binding="#{crearVariablesBalanceCalcular.gridPanel6}" cellspacing="4" id="gridPanel6" style="height: 53px; width: 100%">
                                <ui:alert binding="#{crearVariablesBalanceCalcular.alert1}" id="alert1" style="height: 60px"/>
                            </h:panelGrid>
                            <h:panelGrid binding="#{crearVariablesBalanceCalcular.gridPanel2}" columns="2" id="gridPanel2" styleClass="Tbl" width="637">
                                <ui:label binding="#{crearVariablesBalanceCalcular.label1}" id="label1" text="Variable:"/>
                                <h:panelGrid binding="#{crearVariablesBalanceCalcular.gridPanel5}" columns="2" id="gridPanel5" style="height: 100%" width="450">
                                    <ui:dropDown binding="#{crearVariablesBalanceCalcular.dropDownVariables}" id="dropDownVariables"
                                        items="#{crearVariablesBalanceCalcular.dropDownVariablesDefaultOptions.options}" labelLevel="3"
                                        onChange="common_timeoutSubmitForm(this.form, 'gridPanel1:gridPanel2:gridPanel5:dropDownVariables');" style="width: 202px"/>
                                    <ui:staticText binding="#{crearVariablesBalanceCalcular.staticText8}" id="staticText8" text="*Solo calculadas y sin formulas"/>
                                </h:panelGrid>
                                <ui:label binding="#{crearVariablesBalanceCalcular.label2}" id="label2" text="Descripcion:"/>
                                <ui:staticText binding="#{crearVariablesBalanceCalcular.staticText2}" id="staticText2" style="" text="#{crearVariablesBalanceCalcular.descrip}"/>
                                <ui:label binding="#{crearVariablesBalanceCalcular.label3}" id="label3" text="Usada para:"/>
                                <ui:staticText binding="#{crearVariablesBalanceCalcular.staticText3}" id="staticText3" text="#{crearVariablesBalanceCalcular.tipo}"/>
                                <ui:label binding="#{crearVariablesBalanceCalcular.label6}" id="label6" text="Campo de Porcentaje:"/>
                                <ui:staticText binding="#{crearVariablesBalanceCalcular.staticText9}" id="staticText9" text="#{crearVariablesBalanceCalcular.campo}"/>
                                <ui:label binding="#{crearVariablesBalanceCalcular.label4}" id="label4" text="Subarea:"/>
                                <ui:staticText binding="#{crearVariablesBalanceCalcular.staticText11}" id="staticText11" text="#{crearVariablesBalanceCalcular.area}"/>
                            </h:panelGrid>
                            <h:panelGrid binding="#{crearVariablesBalanceCalcular.gridPanel7}" dir="ltr" id="gridPanel7"
                                style="border: 1px solid #6666ff; text-align: left" styleClass="Tab3Div" width="698">
                                <ui:label binding="#{crearVariablesBalanceCalcular.label5}" id="label5" text="Formula:"/>
                                <ui:panelLayout binding="#{crearVariablesBalanceCalcular.layoutPanel1}" id="layoutPanel1" panelLayout="flow" style="height: 20px; width: 100%">
                                    <ui:label binding="#{crearVariablesBalanceCalcular.labelInfo}" id="labelInfo" style="color: rgb(0, 51, 153)"/>
                                    <ui:label binding="#{crearVariablesBalanceCalcular.staticTextFormula}" id="staticTextFormula"
                                        style="color: rgb(0, 102, 153)" text="#{crearVariablesBalanceCalcular.operacion}"/>
                                </ui:panelLayout>
                            </h:panelGrid>
                            <h:panelGrid binding="#{crearVariablesBalanceCalcular.gridPanel3}" id="gridPanel3" style="height: 100%" width="700">
                                <ui:table augmentTitle="false" binding="#{crearVariablesBalanceCalcular.table1}" id="table1" paginateButton="true"
                                    paginationControls="true" title="Variables Balances" width="771">
                                    <script><![CDATA[
                                /* ----- Functions for Table Preferences Panel ----- */
                                /*
                                * Toggle the table preferences panel open or closed
                                */
                                function togglePreferencesPanel() {
                                var table = document.getElementById("form1:table1");
                                table.toggleTblePreferencesPanel();
                                }
                                /* ----- Functions for Filter Panel ----- */
                                /*
                                * Return true if the filter menu has actually changed,
                                * so the corresponding event should be allowed to continue.
                                */
                                function filterMenuChanged() {
                                var table = document.getElementById("form1:table1");
                                return table.filterMenuChanged();
                                }
                                /*
                                * Toggle the custom filter panel (if any) open or closed.
                                */
                                function toggleFilterPanel() {
                                var table = document.getElementById("form1:table1");
                                return table.toggleTableFilterPanel();
                                }
                                /* ----- Functions for Table Actions ----- */
                                /*
                                * Initialize all rows of the table when the state
                                * of selected rows changes.
                                */
                                function initAllRows() {
                                var table = document.getElementById("form1:table1");
                                table.initAllRows();
                                }
                                /*
                                * Set the selected state for the given row groups
                                * displayed in the table.  This functionality requires
                                * the 'selectId' of the tableColumn to be set.
                                *
                                * @param rowGroupId HTML element id of the tableRowGroup component
                                * @param selected Flag indicating whether components should be selected
                                */
                                function selectGroupRows(rowGroupId, selected) {
                                var table = document.getElementById("form1:table1");
                                table.selectGroupRows(rowGroupId, selected);
                                }
                                /*
                                * Disable all table actions if no rows have been selected.
                                */
                                function disableActions() {
                                // Determine whether any rows are currently selected
                                var table = document.getElementById("form1:table1");
                                var disabled = (table.getAllSelectedRowsCount() > 0) ? false : true;
                                // Set disabled state for top actions
                                document.getElementById("form1:table1:tableActionsTop:deleteTop").setDisabled(disabled);
                                // Set disabled state for bottom actions
                                document.getElementById("form1:table1:tableActionsBottom:deleteBottom").setDisabled(disabled);
                                }]]></script>
                                    <ui:tableRowGroup binding="#{crearVariablesBalanceCalcular.tableRowGroup1}" id="tableRowGroup1" rows="10"
                                        selected="#{crearVariablesBalanceCalcular.selectedState}"
                                        sourceData="#{crearVariablesBalanceCalcular.sct0075DataProviderVarCalculadasBalance}" sourceVar="currentRow">
                                        <ui:tableColumn binding="#{crearVariablesBalanceCalcular.tableColumn1}" headerText="Codigo" id="tableColumn1" sort="SCT0075.CDGOVRBLE">
                                            <ui:staticText binding="#{crearVariablesBalanceCalcular.staticText4}" id="staticText4" text="#{currentRow.value['SCT0075.CDGOVRBLE']}"/>
                                        </ui:tableColumn>
                                        <ui:tableColumn binding="#{crearVariablesBalanceCalcular.tableColumn2}" headerText="Descripcion" id="tableColumn2" sort="SCT0075.DSCRPCION">
                                            <ui:staticText binding="#{crearVariablesBalanceCalcular.staticText5}" id="staticText5" text="#{currentRow.value['SCT0075.DSCRPCION']}"/>
                                        </ui:tableColumn>
                                        <ui:tableColumn binding="#{crearVariablesBalanceCalcular.tableColumn3}" headerText="Usada para:" id="tableColumn3"
                                            sort="SCT0075.TPOVRBLE" width="116">
                                            <ui:staticText binding="#{crearVariablesBalanceCalcular.staticText6}" id="staticText6" text="#{crearVariablesBalanceCalcular.tipoVar}"/>
                                        </ui:tableColumn>
                                        <ui:tableColumn binding="#{crearVariablesBalanceCalcular.tableColumn4}" headerText="Campo de porcentaje"
                                            id="tableColumn4" sort="VRBLEPRCNTJE" width="194">
                                            <ui:staticText binding="#{crearVariablesBalanceCalcular.staticText7}" id="staticText7" text="#{currentRow.value['VRBLEPRCNTJE']}"/>
                                        </ui:tableColumn>
                                        <ui:tableColumn binding="#{crearVariablesBalanceCalcular.tableColumn6}" headerText="Subarea" id="tableColumn6">
                                            <ui:staticText binding="#{crearVariablesBalanceCalcular.staticText10}" id="staticText10" text="#{crearVariablesBalanceCalcular.subarea}"/>
                                        </ui:tableColumn>
                                        <ui:tableColumn align="center" binding="#{crearVariablesBalanceCalcular.tableColumn5}" id="tableColumn5"
                                            onClick="setTimeout('initAllRows()',0);" selectId="#{crearVariablesBalanceCalcular.radioButton1.id}" valign="middle">
                                            <ui:radioButton binding="#{crearVariablesBalanceCalcular.radioButton1}" id="radioButton1" label=""
                                                name="#{crearVariablesBalanceCalcular.radioButton1.id}" selected="#{crearVariablesBalanceCalcular.selected}" selectedValue="#{crearVariablesBalanceCalcular.selectedValue}"/>
                                        </ui:tableColumn>
                                    </ui:tableRowGroup>
                                    <f:facet name="actionsTop">
                                        <ui:panelGroup binding="#{crearVariablesBalanceCalcular.groupPanel1}" id="groupPanel1">
                                            <h:panelGrid binding="#{crearVariablesBalanceCalcular.gridPanel4}" columns="8" id="gridPanel4"
                                                style="text-align: center" styleClass="Tab3Div" width="650">
                                                <ui:button action="#{crearVariablesBalanceCalcular.btnInicio_action}"
                                                    alt="Haga clic para cargar la variable que iniciara la formula"
                                                    binding="#{crearVariablesBalanceCalcular.btnInicio}" id="btnInicio" mini="true" style="width: 73px" text="Cargar Inicial"/>
                                                <ui:button action="#{crearVariablesBalanceCalcular.btnSumar_action}"
                                                    binding="#{crearVariablesBalanceCalcular.btnSumar}" disabled="true" id="btnSumar" mini="true" primary="true"
                                                    style="width: 47px" text="+"/>
                                                <ui:button action="#{crearVariablesBalanceCalcular.btnRestar_action}"
                                                    binding="#{crearVariablesBalanceCalcular.btnRestar}" disabled="true" id="btnRestar" mini="true"
                                                    primary="true" style="width: 31px" text="-"/>
                                                <ui:button action="#{crearVariablesBalanceCalcular.btnMultiplicar_action}"
                                                    binding="#{crearVariablesBalanceCalcular.btnMultiplicar}" disabled="true" id="btnMultiplicar" mini="true"
                                                    primary="true" style="width: 30px" text="*"/>
                                                <ui:button action="#{crearVariablesBalanceCalcular.btnDividir_action}"
                                                    binding="#{crearVariablesBalanceCalcular.btnDividir}" disabled="true" id="btnDividir" mini="true"
                                                    primary="true" style="width: 28px" text="/"/>
                                                <ui:button action="#{crearVariablesBalanceCalcular.btnGuardar_action}"
                                                    binding="#{crearVariablesBalanceCalcular.btnGuardar}" disabled="true" id="btnGuardar" mini="true"
                                                    primary="true" style="width: 63px" text="Crear"/>
                                                <ui:button action="#{crearVariablesBalanceCalcular.btnCancelar_action}"
                                                    binding="#{crearVariablesBalanceCalcular.btnCancelar}" disabled="true" id="btnCancelar" mini="true"
                                                    onClick="if(!confirm('¿Seguro que desea cancelar la operación?\n No se guardaran los cambios realizados.')){return false;};"
                                                    style="width: 108px" text="Cancelar"/>
                                            </h:panelGrid>
                                        </ui:panelGroup>
                                    </f:facet>
                                </ui:table>
                            </h:panelGrid>
                        </h:panelGrid>
                        <ui:button action="#{crearVariablesBalanceCalcular.button1_action}" binding="#{crearVariablesBalanceCalcular.button1}" id="button1"
                            mini="true" primary="true" style="left: 45px; top: 106px; position: absolute; width: 61px" text="Cerrar"/>
                        <ui:button action="#{crearVariablesBalanceCalcular.button2_action}" binding="#{crearVariablesBalanceCalcular.button2}" id="button2"
                            mini="true" primary="true" style="left: 127px; top: 106px; position: absolute; width: 84px" text="Regresar" visible="false"/>
                        <div style="left: 0px; top: 24px; position: absolute"></div>
                    </ui:form>
                </ui:body>
            </ui:html>
        </ui:page>
    </f:view>
</jsp:root>
